<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>

<head>
	<meta charset="UTF-8">
	<title>确认订单-azhuo商城</title>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/style.css">
	<style type="text/css">
		.fl img {
			width: 70px;
			height: 70px;
			padding: 5px;
		}
	</style>
</head>

<body>
	<!-- ----------------------------------- start head ----------------------------------- -->
	<jsp:include page="/jsps/includes/head.jsp" />
	<!-- ----------------------------------- end head ----------------------------------- -->

	<!-- ----------------------------------- start banner_x ----------------------------------- -->
	<jsp:include page="/jsps/includes/banner_x.jsp" />
	<!-- ----------------------------------- end banner_x ----------------------------------- -->

	<!-- ----------------------------------- self_info ----------------------------------- -->
	<div class="grzxbj">
		<div class="selfinfo center">
			<div class="lfnav fl">
				<div class="ddzx">订单中心</div>
				<div class="subddzx">
					<ul>
						<li><a href="" style="color:#ff6700;font-weight:bold;">我的订单</a></li>
						<li><a href="">意外保</a></li>
						<li><a href="">团购订单</a></li>
						<li><a href="">评价晒单</a></li>
					</ul>
				</div>
				<div class="ddzx">个人中心</div>
				<div class="subddzx">
					<ul>
						<li><a href="${pageContext.request.contextPath }/jsps/users/myInfo.jsp">我的个人中心</a></li>
						<li><a href="">消息通知</a></li>
						<li><a href="">优惠券</a></li>
						<li><a href="">收货地址</a></li>
					</ul>
				</div>
			</div>

			<!--  订单详情 -->
			<div class="rtcont fr">
				<div class="ddzxbt">
					<span style="font-size: 12px">
						<span>订单号：${order.oid }</span>
						<span style="padding: 20px 10px;">|</span>
						<span>下单时间<fmt:formatDate value="${order.time }" pattern="yyyy年MM月dd日 HH点mm分ss秒" /></span>
						<span style="padding-left: 10px;">
							<a href="${pageContext.request.contextPath }/OrderServlet?method=removeOrder&oid=${order.oid }">删除订单</a>
							</span>
					</span>
					<a style="display: block; float: right; padding-right: 50px;" href="${pageContext.request.contextPath }/OrderServlet?method=findAllOrder">查看所有订单</a>
				</div>
				<div>${requestSocpe.orderList }</div>
				<c:forEach items="${order.orderItemList}" var="orderItem">
					<div class="ddxq">
						<div class="ddspt fl">
							<a href="${pageContext.request.contextPath }/GoodsServlet?method=loadGoods&gid=${orderItem.goods.gid}">
								<img src="${pageContext.request.contextPath }/image/goods/${orderItem.goods.image}" alt="商品图片" />
							</a>
						</div>
						<div class="ddbh fl" style="font-size: 12px">商品名称:${orderItem.goods.gname}</div>
						<div class="ztxx fr">
							<ul>
								<%-- 商品单价 --%>
								<li style="width: 165px;">单价：<fmt:formatNumber value="${orderItem.goods.price}" pattern="#.00"/>元</li>
								<%-- 购买数量 --%>
								<li style="width: 165px;">购买数量：${orderItem.count}</li>
								<%-- 条目小计 --%>
								<li style="width: 180px;">小计：<fmt:formatNumber value="${orderItem.subtotal}" pattern="#.00"/>元</li>
								<div class="clear"></div>
							</ul>
						</div>
						<div class="clear"></div>
					</div>
				</c:forEach>
			</div>

			<div class="clear"></div>
		</div>
	</div>
	<!-- ----------------------------------- self_info ----------------------------------- -->

	<!-- ----------------------------------- start footer ----------------------------------- -->
	<jsp:include page="/jsps/includes/footer.jsp" />
	<!-- ----------------------------------- end login ----------------------------------- -->
</body>

</html>